<include file="public@header"/>
<link href="__TMPL__/public/assets/themes/{:cmf_get_admin_style()}/house.css" rel="stylesheet">
</head>
<body>
  <div class="house-gonggao-edit">
    <form action="addForm.html" class="js-ajax-form" method="post" name="editForm">
      <table class="table table-hover table-bordered">
        <tr>
          <td width="60">标题</td>
          <td>
            <input class="form-control" type="text" name="title" value="{$data.title}">
          </td>
        </tr>
        <tr>
          <td>详情</td>
          <td>
            <script type="text/plain" id="content" name="content">{$data.content}</script>
          </td>
        </tr>
      </table>
    </form>
  </div>
  <script type="text/javascript" src="__STATIC__/js/ueditor/ueditor.frontend.config.js"></script>
  <script type="text/javascript" src="__STATIC__/js/ueditor/ueditor.all.min.js"></script>
  <script type="text/javascript">
    $(function () {
      // 编辑器
      editorcontent = new baidu.editor.ui.Editor();
      editorcontent.render('content');
      try {
          editorcontent.sync();
      } catch (err) {
      }
    });

    function getForm() {
      var formData = {
        title: editForm.title.value,
        content: editForm.content.value
      }

      var url = '{:url("editForm", array("id" => $data.id))}'
      return {
        url: url,
        formData: formData
      }
    }
  </script>
  <script src="__STATIC__/js/admin.js"></script>
</body>
</html>
